﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="StoreExample.aspx.cs" Inherits="CooliteExamples.Web.Pages.Communication.StoreExample" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
		<title></title>
</head>
<body>
		<ext:ScriptManager runat="server" />
		<form id="form1" runat="server">
		<ext:Store ID="BookStore1" runat="server" AutoLoad="false" AutoDataBind="false">
				<Reader>
						<ext:JsonReader>
								<Fields>
										<ext:RecordField Name="Title" />
										<ext:RecordField Name="ISBN" />
										<ext:RecordField Name="CategoryName" />
								</Fields>
						</ext:JsonReader>
				</Reader>
		</ext:Store>
		<ext:Store ID="BookStore2" runat="server" AutoLoad="false" AutoDataBind="false">
				<Reader>
						<ext:JsonReader Root="data">
								<Fields>
										<ext:RecordField Name="Title" />
										<ext:RecordField Name="ISBN" />
										<ext:RecordField Name="CategoryName" />
								</Fields>
						</ext:JsonReader>
				</Reader>
		</ext:Store>
		<ext:Panel ID="pnlMain" runat="server" Border="false" AutoHeight="true">
				<Body>
						<ext:AnchorLayout runat="server">
								<ext:Anchor>
										<ext:Button ID="btnBookStore1" runat="server" Icon="ArrowRight" Text="Submit for DataBind">
												<AjaxEvents>
														<Click OnEvent="btnBookStore1_Click" Type="Load" Method="POST" />
												</AjaxEvents>
										</ext:Button>
								</ext:Anchor>
								<ext:Anchor>
										<ext:GridPanel ID="gpBookStore1" runat="server" Height="170" AutoScroll="true" StoreID="BookStore1"
												StripeRows="true" StyleSpec="margin-bottom: 10px;">
												<ColumnModel runat="server">
														<Columns>
																<ext:Column Header="Title" DataIndex="Title" Width="250" />
																<ext:Column Header="ISBN" DataIndex="ISBN" Width="100" />
																<ext:Column Header="CategoryName" DataIndex="CategoryName" Width="100" />
														</Columns>
												</ColumnModel>
												<LoadMask Msg="Loading..." ShowMask="true" />
												<View>
														<ext:GridView runat="server" ForceFit="true" />
												</View>
										</ext:GridPanel>
								</ext:Anchor>
								<ext:Anchor>
										<ext:Button ID="btnBookStore2" runat="server" Icon="ArrowRight" Text="Submit for Handler">
												<AjaxEvents>
														<Click OnEvent="btnBookStore2_Click" Method="POST" Type="Load" />
												</AjaxEvents>
										</ext:Button>
								</ext:Anchor>
								<ext:Anchor>
										<ext:GridPanel ID="gpBookStore2" runat="server" Height="170" AutoScroll="true" StoreID="BookStore2"
												StripeRows="true">
												<ColumnModel ID="ColumnModel1" runat="server">
														<Columns>
																<ext:Column Header="Title" DataIndex="Title" Width="250" />
																<ext:Column Header="ISBN" DataIndex="ISBN" Width="100" />
																<ext:Column Header="CategoryName" DataIndex="CategoryName" Width="100" />
														</Columns>
												</ColumnModel>
												<LoadMask Msg="Loading..." ShowMask="true" />
												<View>
														<ext:GridView runat="server" ForceFit="true" />
												</View>
										</ext:GridPanel>
								</ext:Anchor>
						</ext:AnchorLayout>
				</Body>
		</ext:Panel>
		</form>
</body>
</html>
